from PIL import Image

logo = Image.open('logo.png')
ms = Image.open('maishu.jpeg')

#动态计算logo的坐标：使用maishu的width减去logo的width，就是x的坐标。y坐标同理
x = ms.width - logo.width
y = ms.height - logo.height
ms.paste(logo, (x, y))
ms.save('maishu4.jpeg')
